/* Copyright (c) 2025 Beijing Semidrive Technology Corporation
 * SPDX-License-Identifier: Apache-2.0
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/********************************************************************************************************
 * \file     FuSaMcalReportError.c                                                                                   *
 * \brief    AUTOSAR 4.3.1 MCAL DMA Driver                                                              *
 *                                                                                                      *
 * <table>                                                                                              *
 * <tr><th>Date           <th>Version                                                                   *
 * <tr><td>2025/01/06     <td>1.0.0                                                                     *
 * </table>                                                                                             *
 *******************************************************************************************************/
#ifdef __cplusplus
extern "C" {
#endif
/********************************************************************************************************
 *                                      Include header files                                            *
 *******************************************************************************************************/
#include "FuSaMcalReportError.h"
#include "debug.h"

#define MCALLIB_START_SEC_CODE
#include "McalLib_MemMap.h"

Std_ReturnType FuSaMcal_ReportError(uint16 moduleId, uint8 instanceId, uint8 apiId, uint8 errorId)
{
#if defined(CFG_NOT_USED_AUTOSAR_OS)
    /* Just for temp used */
    /*PRQA S 3200, 3344 2*/
    PRINT("Det:ReportError: Module %d, Instance %d, Api %d, Error %d\n",
          moduleId, instanceId, apiId, errorId);

    /* Never return, but has a return type for compatibility */
    /*while (Det_DummyFlag == 0u);*/
#else

    while (1);

#endif /** #if defined(CFG_NOT_USED_AUTOSAR_OS) */
    return E_OK;
}

#define MCALLIB_STOP_SEC_CODE
#include "McalLib_MemMap.h"

#ifdef __cplusplus
}
#endif
/* End of file */

